#ifndef CHATWINDOW_H
#define CHATWINDOW_H

#include <QMainWindow>
#include<QList>
#include"Account/account.h"
namespace Ui {
class chatwindow;
}

class chatwindow : public QMainWindow
{
    Q_OBJECT

public:
    static chatwindow *getinstance(){
        if(mychatwindow==nullptr)
            mychatwindow=new chatwindow();
        return mychatwindow;


    }
       void gethistory(QList<QPair<QString,QString>> list);
       QString myid;
       QString friendid;
       void GetFriendMsg(QString msg);

    explicit chatwindow(QWidget *parent = nullptr);
    ~chatwindow();

private slots:
    void on_pushButton_clicked();
signals:
   void sendmsg(QString id,QString msg);
   void sig_msg_requeset(QString id_me);

private:
    Ui::chatwindow *ui;
   static chatwindow *mychatwindow;
   QList<QPair<QString,QString>> history;

};

#endif // CHATWINDOW_H
